package utils

import (
	"api-gateway/pkg"
	"github.com/gin-gonic/gin"
)

type FileUpload interface {
	Upload(c *gin.Context) (string, error)
}

type LocalFileUpload struct {
}

func NewLocalFileUpload() *LocalFileUpload {
	return &LocalFileUpload{}
}

func (l *LocalFileUpload) Upload(c *gin.Context) (string, error) {
	return pkg.LocalFileUpload(c)
}

type AliyunFileUpload struct {
}

func NewAliyunFileUpload() *AliyunFileUpload {
	return &AliyunFileUpload{}
}

func (a *AliyunFileUpload) Upload(c *gin.Context) (string, error) {
	return pkg.AliyunFileUpload(c)
}

//func Demo(c *gin.Context) {
//	url, err := NewLocalFileUpload().Upload(c)
//}
